package com.example.gameforum.service;


import com.example.gameforum.dao.UserDao;
import com.example.gameforum.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    private UserDao userDao;

    public  void insertUser(User user){
        userDao.save(user);
    }

    public User getById(int id){
        return userDao.getOne(id);
    }
}
